<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>AiEditor Demo</title>
</head>
<body>

<script>
    let isDark = false;
    function dark(){
        if (!isDark){
            document.body.style.background="#1a1b1e"
            document.querySelector("#title").style.color="#eee"
            document.querySelector("#aiEditor").classList.remove("aie-theme-light");
            document.querySelector("#aiEditor").classList.add("aie-theme-dark");
        }else {
            document.body.style.background=""
            document.querySelector("#title").style.color=""
            document.querySelector("#aiEditor").classList.remove("aie-theme-dark");
            document.querySelector("#aiEditor").classList.add("aie-theme-light");
        }
        isDark = !isDark;
    }
</script>


<div style="padding: 10px 20px;font-size: 30px" id="title">
    AiEditor，一个面向 AI 的下一代富文本编辑器（开源）。
    <button onclick="dark()">切换主题</button>
</div>

<div id="aiEditor" style="height: 550px; width: 960px; margin: 20px"></div>
<script type="module" src="/demos/main.ts"></script>
</body>
</html>
